package com.atguigu.gulimail.seckill.config;

import com.atguigu.gulimail.seckill.interceptor.LoginUserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author fangy
 * @date 2022-10-12 11:05
 */
@Configuration
public class GulimailCartWebMvcConfig implements WebMvcConfigurer {


    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        registry.addInterceptor(new LoginUserInterceptor()).addPathPatterns("/**");

    }
}
